package main

import "fmt"

func bubbleSort(arr []int) []int {
	n := len(arr)
	for i:=0; i< n ; i++  {
		for j:=0; j< n-i-1;j++{
				if (arr[j+1] > arr[j]){
				arr[j+1],arr[j] = arr[j],arr[j+1]
			}
		}
	}
	return arr
}

func main() {
	var arr []int = []int{1,3,2,4,5,6,7,8,9}
	fmt.Println(bubbleSort(arr))
}